package com.bjc.service.impl;

import com.bjc.pojo.User;
import com.bjc.repository.UserRepository;
import com.bjc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: ssmpractice
 * @description:
 * @author: bjc
 * @create: 2020-08-30 19:33
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserRepository userRepository;

    @Override
    public List<User> findAll() {
        return userRepository.findAll();
    }

    @Override
    public int add(User user) {
        System.out.println("---------------->添加用户表");
        return userRepository.add(user);
    }
}
